import request from '@/utils/request'

// 查询贷款合同列表(不分页)
export function allListContract(query) {
  return request({
    url: '/loan/contract/all/list',
    method: 'get',
    params: query
  })
}

// 查询贷款合同列表
export function listContract(query) {
  return request({
    url: '/loan/contract/list',
    method: 'get',
    params: query
  })
}

// 查询贷款合同详细
export function getContract(contractId) {
  return request({
    url: '/loan/contract/' + contractId,
    method: 'get'
  })
}

// 新增贷款合同
export function addContract(data) {
  return request({
    url: '/loan/contract',
    method: 'post',
    data: data
  })
}

// 修改贷款合同
export function updateContract(data) {
  return request({
    url: '/loan/contract',
    method: 'put',
    data: data
  })
}

// 删除贷款合同
export function delContract(contractId) {
  return request({
    url: '/loan/contract/' + contractId,
    method: 'delete'
  })
}
